<template>
  <div>
    <input
      type="text"
      v-model="value2"
      @keydown.enter="fn"
    >
  </div>
</template>
<script>
// @ is an alias to /src
export default {
  props: {
    value: {
      type: [String, Number],
      required: true,
    },
  },
  methods: {
    fn(e) {
      this.$emit("submit", e);
    },
  },
  computed: {
    value2: {
      get() {
        return this.value;
      },
      set(val) {
        this.$emit("input", val);
      },
    },
  },

  components: {},
};
</script>
<style lang="less">
</style>